<?php
// strict_types=1 及开启严格模式
// 严格模式下，如果一个变量没有定义，那么就会报错
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class PaymentChannels extends Model
{
    protected $autoWriteTimestamp = 'datetime';
    
    // 设置当前模型对应的完整数据表名称
    protected $table = 'payment_channels';

    // 设置字段信息
    protected $schema = [
        'channel_name'          => 'string',
        'pay_code'              => 'string',
        'channel_status'        => 'boolean',
        'channel_debug'         => 'boolean',
        'channel_code'          => 'string',
        'pay_url'               => 'string',
        'find_url'              => 'string',
        'channel_rate'          => 'float',
        'channel_rate_boolean'  => 'boolean',
        'create_time'           => 'datetime'
    ];

    // 设置字段自动转换类型
    protected $type = [
        'channel_rate'      => 'float',
        'create_time'       => 'datetime',
    ];

    // 设置废弃字段
    protected $disuse = [];
}
